﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Windows.Media;

namespace Chaos.model
{
    public class victorypointmarker : INotifyPropertyChanged, stream.streamable
    {
        public event PropertyChangedEventHandler PropertyChanged;
        protected void Notify(string property)
        {
            if (this.PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(property));
            }
        }

        public ImageSource victorypointmarkerimage;
        public ImageSource VictoryPointMarkerImage
        {
            get { return victorypointmarkerimage; }
            set
            {
                if (victorypointmarkerimage != value)
                {
                    victorypointmarkerimage = value;
                    Notify("VictoryPointMarkerImage");
                }
            }
        }


        private String m_faction;
        public String Faction
        {
            get { return m_faction; }
            set
            {
                if (m_faction != value)
                {
                    m_faction = value;
                    Notify("Faction");
                }
            }
        }

        private int m_score;
        public int Score
        {
            get { return m_score; }
            set
            {
                if (m_score != value)
                {
                    m_score = value;
                    Notify("Score");
                }
            }
        }

        public virtual void serialize(stream.stream io_Stream)
        {
            io_Stream.begin("victorypointmarker")
                .serialize("Faction", ref m_faction)
                .serialize("Score", ref m_score)
            .end();
        }
    }
}
